package com.example.zhaojianxu.signin.signIn.teacher.adapter

import android.content.Context
import android.content.Intent
import android.support.v7.widget.RecyclerView
import android.view.View
import com.example.zhaojianxu.signin.signIn.teacher.view.TeacherDetailActivity
import kotlinx.android.synthetic.main.item_teacher.view.*

class TeacherVH(val rootView: View) : RecyclerView.ViewHolder(rootView) {

    fun bindData(){
        rootView.item_teacher_name
        rootView.item_teacher_subject

        itemView.setOnClickListener {
            val intent = Intent(rootView.context, TeacherDetailActivity::class.java)
            rootView.context.startActivity(intent)
        }
    }
}